home *** CD-ROM | disk | FTP | other *** search
- Path: s02.pavilion.co.uk!usenet
- From: AJRobb@pavilion.co.uk (Andy J Robb)
- Newsgroups: comp.lang.c
- Subject: Re: [Q] Does free() work?
- Date: Sat, 24 Feb 1996 23:05:00 GMT
- Organization: Pavilion Internet plc
- Message-ID: <4go5h0$sql@s02.pavilion.co.uk>
- References: <4gm3ss$qfa@news.infoserve.net>
- NNTP-Posting-Host: poolc50.pavilion.co.uk
- X-Newsreader: Forte Free Agent 1.0.82
-
- yang@unix.infoserve.net (Sung Moo Yang) wrote:
-
- >Question on the function free() in MSC 5.1 running on MS-DOS 6.0 on 486 DX2.
-
- >The library function free() doesn't free memory allocated however _dos_freemem() does.
- >Example TEST.C uses free() to release memory while TEST2.C uses _dos_freemem() to do so. Result screen was followed respectively.
-
- >Why doesn't free() release the memory allocated?
- >Thanks in advance.
-
- Once memory has been grabbed for the heap it is usually retained.
- However, free() does allow the memory to be re-used by malloc().
-
- Regards,
- Andy Robb.
- -----BEGIN PGP PUBLIC KEY BLOCK-----
- Version: 2.6.2i
-
- mQCNAy/MpRwAAAEEAOt6uBYqT8yv9EmqNhK8m6v+bYi8QjnGW3Bo6iU1gsMj5pa6
- MHgq99c8deADbE3cbJ6uZS9v5pZE3WCf6HCQjlB5iULA5RZzMdAumd/WUzuL9UT3
- B44D9EqqFIL79FlYb56v4oKFqFp1/J2bIpYUwnUvabGzGjdLrpPl4P16x9sNAAUR
- tCNBbmR5IEogUm9iYiA8QUpSb2JiQHBhdmlsaW9uLmNvLnVrPrQhQW5keSBSb2Ji
- IDxBSlJvYmJAcGF2aWxpb24uY28udWs+
- =/wVD
- -----END PGP PUBLIC KEY BLOCK-----
-
-